Page({
    data: {
        msg:'操作成功',
        redirectUrl:'',
        btText:'返回',
        param1:''
    },
    onLoad: function (options) {
        const msg=options.msg;
        const redirectUrl=options.redirectUrl;
        const btText=options.btText;
        const param1=options.param1;
        if(msg){
            this.setData({
                msg:msg,
                redirectUrl:redirectUrl==null?'': redirectUrl,
                btText:btText==null?'返回': btText,
                param1:param1
            })
        }
    },
    openSuccess: function () {
        wx.redirectTo({
            url: this.data.redirectUrl+"?param1="+this.data.param1
        })
    },
    gotoIndex:function () {
        wx.redirectTo({
            url: "../index/index"
        })
    }
});